package app.hanxiao.com.demo;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import app.hanxiao.com.demo.push.PushActivity;
import app.hanxiao.com.demo.qrcore.ScanQRActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MainActivity extends AppCompatActivity {

    @BindView(R.id.push_bt)
    Button pushBt;
    @BindView(R.id.scanQRcore)
    Button scanQRcore;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
    }

    @OnClick({R.id.push_bt, R.id.scanQRcore})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.push_bt:
                Intent pushIntent = new Intent(MainActivity.this, PushActivity.class);
                startActivity(pushIntent);
                break;
            case R.id.scanQRcore:
                Intent scanIntent = new Intent(MainActivity.this, ScanQRActivity.class);
                startActivity(scanIntent);
                break;
        }
    }
}
